<template>
    <view>
        <!-- 会员信息 -->
        <view class="cashier_box_2">
            <view class="cardsale-conter">
                <view class="shop-message">
                    <view class="shop-lt">
                        <view class="lt-profile">
                            <image :src="memberList.headPicture || 'https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/profile-hai.png'" mode="" />
                        </view>
                        <view class="lt-name" v-if="memberid">
                            {{ memberList.userName }}
                            <text class="lt-shopvip" v-if="memberList.storeVip">门店VIP</text>
                            <view class="lt-phone">{{ memberList.mobile }}</view>
                        </view>
                        <view class="traveler" v-else>散客</view>
                    </view>
                    <view class="hr" v-if="memberid"></view>
                    <view class="shop-rl">
                        <view class="rl-vipbox">
                            <view class="rl-vip" v-if="memberid">VIP会员</view>
                            <view class="rl-remaining" v-if="memberid">余额：¥{{ memberList.balance }}</view>
                        </view>
                        <image @tap="ElasticFrameClick" class="replace" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/replace.png"></image>
                    </view>
                </view>
                <view></view>
            </view>
        </view>
        <!-- 列表 -->
        <view class="goods_list" v-for="(item, index) in infoList" :key="index">
            <view class="list_t">
                <view class="list_t_l">
                    <text class="num">{{ item.serviceNo }}</text>
                    <text class="name">{{ item.serviceName }}</text>
                </view>
                <view class="list_t_r">
                    <image @tap="goProjectSet" :data-index="index" class="edit_icon" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/edit_icon.png" mode="" />
                    <image class="del_icon" :data-index="index" @tap="delOneData" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/del_icon.png" mode="" />
                </view>
            </view>

            <view class="list_c">
                <view class="list_c_t" v-for="(i, id) in item.selLists" :key="i.id">
                    <view class="list_c_t_l" :data-index="index" @tap="getShowModalselect">
                        <text class="no">第{{ id + 1 }}人</text>
                        <text class="n">{{ i.name }}</text>
                        <text class="_n">></text>
                    </view>

                    <view class="list_c_t_r">
                        <view class="results">
                            <text>业绩：¥</text>
                            <input
                                class="inputPci"
                                type="number"
                                :data-pindex="index"
                                :data-index="id"
                                @input="inputResultsPrice"
                                :value="i.resultsPrice"
                                :placeholder="performance"
                            />
                        </view>
                        <view class="commission">
                            <text>提成：¥</text>
                            <input
                                class="inputPci"
                                type="number"
                                :data-pindex="index"
                                :data-index="id"
                                @input="inputCommissionPrice"
                                :value="i.commissionPrice"
                                :placeholder="royalties"
                            />
                        </view>
                    </view>
                </view>
                <view class="list_c_b" :data-index="index" @tap="getShowModalselect">
                    <image src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/append.png" mode="" />
                </view>
            </view>

            <view class="list_b">
                <text class="no_vip">
                    {{ item.shopVip ? '门店VIP' : '不使用会员卡' }}
                    <text v-if="item.discount" class="discount">{{ item.discount }}</text>
                </text>
                <text class="price">¥{{ item.memberPrice }}</text>
            </view>
        </view>
        <!-- 添加按钮 -->
        <view class="btn_box" @tap="goToAddGoods">
            <text>添加项目或商品</text>
        </view>
        <!-- 优惠卷 -->
        <view class="helpcard-conterbox">
            <view class="helpcard-conter">
                <view class="card-namebox">
                    <view class="cardname_lt">
                        <view class="card_name">优惠券：</view>
                    </view>
                    <view class="autogeneration" @tap="showModalcouponFun" v-if="Couponslist.length > 0">{{ Couponslist.length }}张可用</view>
                    <view class="no-autogeneration" v-else>无可用优惠券</view>
                </view>
                <view class="card-namebox">
                    <view class="cardname_lt">
                        <view class="card_name">意豆抵扣：</view>
                    </view>
                    <view class="select_card">-¥{{ deductionNum }}</view>
                </view>
                <view class="card-namebox">
                    <view class="cardname_lt">
                        <view class="card_name">整单减免：</view>
                    </view>
                    <view class="select_card">-¥{{ num - payNum }}</view>
                </view>
                <view class="card-namebox">
                    <view class="cardname_lt">
                        <view class="card_name">备注：</view>
                        <input :adjust-position="true" :value="remark" @input="getinfo" placeholder="请输入备注内容" type="text" />
                    </view>
                </view>
            </view>
        </view>
        <view class="base_btn"></view>
        <view class="base-box">
            <view class="card-namebox2">
                <view class="cardname_lt">
                    <view class="cardname_ltitem">
                        <view class="bill_moneytext">
                            账单金额：
                            <text class="bill_money">¥{{ num }}</text>
                            元
                        </view>
                        <view class="bill_moneytext">
                            需要支付：
                            <text class="bill_money">¥{{ payNum }}</text>
                            元
                        </view>
                    </view>
                </view>
                <view class="sumtotal" @tap="smearbut">抹零</view>
            </view>
            <view class="base-botton">
                <view class="botton-entry" @tap="createServiceOrder">下一步</view>
                <view class="botton-entry" @tap="handbrand">挂单</view>
            </view>
        </view>

        <!-- 弹出层 -->
        <view class="modal-mask2" @tap="hideModal" v-if="showModalcoupon" @touchmove.stop.prevent="trueFun" style="overflow: visible !important"></view>
        <view class="modal-mask2" @tap="hideModal" v-if="showModalhandbrand" @touchmove.stop.prevent="trueFun" style="overflow: visible !important"></view>
        <view class="modal-mask2" @tap="hideModal" v-if="showModalsmearbut" @touchmove.stop.prevent="trueFun" style="overflow: visible !important"></view>
        <view class="modal-mask" @tap="hideModal" v-if="showModal" @touchmove.stop.prevent="trueFun" style="overflow: visible !important"></view>
        <view v-if="showModal" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
            <view class="modal-content" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
                <view class="qrcodetextbox">
                    <view class="time-box2">
                        <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_lt.png"></image>
                        <view class="qrcodetext">选择会员</view>
                        <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_rl.png"></image>
                    </view>
                    <image class="done" @tap="hideModal" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/done.png"></image>
                </view>

                <view class="qrcodebox">
                    <view class="qrcodetextbox2">
                        <input
                            class="input-phone-up"
                            maxlength="11"
                            @input="blurPhone2"
                            value=""
                            placeholder="请输入顾客手机号码"
                            placeholder-class="placeholder-style2"
                            type="text"
                        />
                        <view class="inquire2" @tap="inquire2">查询</view>
                    </view>
                    <!-- <view class="phone-hint2" wx:if="{{ishint}}">
      输入正确手机号
    </view> -->
                    <view class="replace-box" v-if="memberLists.mobile">
                        <view class="replace-lt">
                            <image class="girl" mode="aspectFill" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/girl.png"></image>
                            <view>
                                <view class="lt-nname">{{ memberLists.userName }}</view>
                                <view class="lt-hpone2">{{ memberLists.mobile }}</view>
                            </view>
                        </view>
                        <view class="replace-rl" @tap="replace">去替换</view>
                    </view>
                </view>
                <view class="qrcodeicon">
                    <view class="qrcodeiconbox" v-for="(item, index) in serviceList" :key="index">
                        <image class="wechatvip" :src="item.img"></image>

                        <P class="wechattext">{{ item.title }}</P>
                    </view>
                </view>
            </view>
        </view>
        <!-- 优惠券 -->
        <view v-if="showModalcoupon" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
            <view class="modal-content-showModalhandbrand" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
                <view class="qrcodebox">
                    <view class="qrcodetextbox">
                        <view class="time-box2q">
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_lt.png"></image>
                            <view class="qrcodetext">请选择优惠券</view>
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_rl.png"></image>
                        </view>
                        <image class="done" @tap="hideModal" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/done.png"></image>
                    </view>
                    <scroll-view :scroll-y="true" class="mains">
                        <view class="coupon-box" v-for="(item, index) in Couponslist" :key="index">
                            <view class="coupon-lt">
                                <view class="coupon-sum">
                                    <view class="money">
                                        <text class="moneytext">￥</text>
                                        {{ item.discount }}
                                    </view>
                                    <view class="reduction" v-if="item.useLimit == 0">无限制</view>
                                    <view class="reduction" v-if="item.useLimit == 1">
                                        满
                                        <text>{{ item.useLimitAmount }}</text>
                                        元可用
                                    </view>
                                </view>
                            </view>

                            <view class="coupon-rl">
                                <view class="coupon-ao">
                                    <view class="coupon-name">{{ item.couponName }}</view>
                                    <view class="coupon-time">{{ item.startTime }} - {{ item.endTime }}有效</view>
                                </view>
                                <view v-if="listindexcoupon === index" :data-index="index" :data-couponid="item.recordId" @tap="onClickcoupon" class="bigbox2">
                                    <view class="smbox"></view>
                                </view>
                                <view v-else class="bigbox2" :data-index="index" :data-couponid="item.recordId" @tap="onClickcoupon"></view>
                            </view>
                        </view>
                    </scroll-view>
                    <view class="no-couponbut" @tap="hideModal">不使用优惠券</view>
                </view>
            </view>
        </view>
        <!-- 手牌号 -->
        <view v-if="showModalhandbrand" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
            <view class="modal-content-showModalhandbrand" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
                <view class="qrcodebox">
                    <view class="qrcodetextbox">
                        <view class="time-box2q">
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_lt.png"></image>
                            <view class="qrcodetext">请选择{{ selStatus === 1 ? '手牌' : '门牌' }}号</view>
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_rl.png"></image>
                        </view>
                        <image class="done" @tap="hideModal" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/done.png"></image>
                    </view>
                    <scroll-view :scroll-y="true" class="mains" v-if="selStatus === 1">
                        <view class="handbrand-conter">
                            <view
                                :class="
                                    'handbrandnumber ' +
                                    (item.status === 1 ? 'noSelete' : '') +
                                    ' ' +
                                    (indexs == item.brand && item.status === 0 ? 'handbrandnumberac' : 'handbrandnumber')
                                "
                                @tap="indexnamber"
                                :data-status="item.status"
                                :data-index="item.brand"
                                v-for="(item, index) in hangOrderList"
                                :key="index"
                            >
                                {{ item.brand }}
                            </view>
                        </view>
                    </scroll-view>
                    <scroll-view :scroll-y="true" class="mains" v-if="selStatus === 2">
                        <view class="one_floor" v-for="(item, index) in hangOrderList" :key="index">
                            <view class="floor_title">
                                <view></view>
                                <text>{{ item.floor }}</text>
                            </view>

                            <view class="handbrand-conter">
                                <view
                                    :class="
                                        'handbrandnumber ' +
                                        (i.status === 1 ? 'noSelete' : '') +
                                        ' ' +
                                        (indexs == i.brand && i.status === 0 && pid === item.id ? 'handbrandnumberac' : 'handbrandnumber')
                                    "
                                    @tap="indexNamberFloor"
                                    :data-status="i.status"
                                    :data-brand="i.brand"
                                    :data-id="i.id"
                                    :data-index="id"
                                    :data-pid="item.id"
                                    v-for="(i, id) in item.settings"
                                    :key="i.id"
                                >
                                    {{ i.brand }}
                                </view>
                            </view>
                        </view>
                    </scroll-view>
                    <view class="qrcodetextbox2">
                        <input
                            class="input-phone-up"
                            v-if="selStatus === 1"
                            maxlength="11"
                            @input="handbrandsum"
                            value=""
                            placeholder="手动输入其他号码"
                            placeholder-class="placeholder-style2"
                            type="text"
                        />
                        <view class="inquire2" @tap="entryorders">确认</view>

                        <view class="bnt-sellrl btn_floor" v-if="selStatus === 2" @tap="entryorders">确认</view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 抹零 -->
        <view v-if="showModalsmearbut" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
            <view class="modal-content-showModalhandbrand" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
                <view class="qrcodebox">
                    <view class="qrcodetextbox">
                        <view class="time-box2qm">
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_lt.png"></image>
                            <view class="qrcodetext">抹零方式</view>
                            <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_rl.png"></image>
                        </view>
                        <image class="done" @tap="hideModal" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/done.png"></image>
                    </view>
                    <scroll-view :scroll-y="true" class="mains">
                        <view class="smearbut-box" v-for="(item, index) in smearList" :key="index">
                            <view class="coupon-rl">
                                <view v-if="listindexsmear === index" :data-index="index" @tap="onClicksmear" class="bigbox2">
                                    <view class="smbox"></view>
                                </view>
                                <view
                                    v-else
                                    class="bigbox2"
                                    :data-item="item"
                                    :data-stylistid="item.stylistId"
                                    :data-nickname="item.nickname"
                                    :data-index="index"
                                    @tap="onClickcoupon"
                                ></view>
                            </view>

                            <view>{{ item.manner }}</view>
                        </view>
                    </scroll-view>
                    <view class="coupon-mai">
                        <view class="cancel-bnt" @tap="hideModal">取消</view>
                        <view class="affirm-bnt" @tap="affirm">确认</view>
                    </view>
                </view>
            </view>
        </view>
        <!-- 增加员工 -->
        <view class="modal-mask2" @tap="hideModal" v-if="showModalselect" @touchmove.stop.prevent="trueFun" style="overflow: visible !important"></view>
        <view v-if="showModalselect" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
            <view class="modal-content" @touchmove.stop.prevent="trueFun" style="overflow: visible !important">
                <view class="qrcodetextbox">
                    <view class="time-box2">
                        <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_lt.png"></image>
                        <view class="qrcodetext">增加员工</view>
                        <image class="time-left" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/time_rl.png"></image>
                    </view>
                    <image class="done" @tap="done" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/done.png"></image>
                </view>

                <view class="qrcodebox">
                    <view class="qrcodetextbox2">
                        <input
                            class="input-phone-up"
                            maxlength="11"
                            @input="blurPhone3"
                            value=""
                            placeholder="请输入姓名，工号，手机号搜索"
                            placeholder-class="placeholder-style2"
                            type="text"
                        />
                        <view class="inquire2" @tap="getStaffInfo">查询</view>
                    </view>
                    <!-- <view class="phone-hint2" wx:if="{{ishint}}">
      输入正确手机号
    </view> -->
                    <scroll-view :scroll-y="true" class="list_box">
                        <view class="replace-box2" v-for="(item, index) in lists" :key="index">
                            <view :data-index="index" :data-staffid="item.staffId" @tap="onClick" class="bigbox">
                                <image v-if="item.checkout" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_6.png" mode="" />
                                <image v-else src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_5.png" mode="" />
                            </view>

                            <!-- <view wx:else class="bigbox" wx:key="index" data-item="{{item}}" data-stylistid="{{item.stylistId}}" data-nickname="{{item.nickname}}" data-index="{{index}}" bindtap="onClick"></view> -->

                            <view class="replace-lt" :data-index="index" :data-staffId="item.staffId" @tap="onClick">
                                <image class="girl2" mode="aspectFill" :src="item.headPicture || 'https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/profile-hai.png'"></image>
                                <view>
                                    <view class="lt-nname_yg">{{ item.name }}</view>
                                    <view class="lt-hpone2">
                                        工号：
                                        <text>{{ item.staffId }}</text>
                                    </view>
                                </view>
                            </view>

                            <view class="hr_list"></view>

                            <view class="specified_box">
                                <view :class="'specified_item ' + (!item.specified ? 'specified_item_sel' : '')" :data-item="item" :data-index="index" @tap="changeStatus">
                                    <image v-if="!item.specified" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_6.png" mode="" />
                                    <image v-else src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_5.png" mode="" />
                                    <text>非指定</text>
                                </view>
                                <view :class="'specified_item specified_item_av ' + (item.specified ? 'specified_item_sel' : '')" :data-index="index" @tap="changeStatus">
                                    <image v-if="item.specified" src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_6.png" mode="" />
                                    <image v-else src="https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/pay_icon_5.png" mode="" />
                                    <text>指定</text>
                                </view>
                            </view>
                        </view>
                    </scroll-view>
                    <view class="bnt-sell">
                        <view class="bnt-selllt" @tap="bntselllt">取消</view>
                        <view class="bnt-sellrl" @tap="clickSel">确定</view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
// pagesc/cashierinfo/cashierinfo.js
import _request from '../../utils/request';
export default {
    data() {
        return {
            performance: '',
            royalties: '',
            sums: '',
            staffid: '',
            listindexsmear: 0,

            smearList: [
                {
                    manner: '抹角',
                    index: 0
                },
                {
                    manner: '抹分',
                    index: 1
                },
                {
                    manner: '四舍五入',
                    index: 2
                },
                {
                    manner: '抹进位',
                    index: 3
                }
            ],

            indexs: 1,
            info: '',
            showModal: false,
            ajxtrue: false,
            ishint2: false,
            showModalcoupon: false,
            showModalhandbrand: false,
            showModalsmearbut: false,
            showModalselect: false,
            phone2: '',
            amountangle: 100.565212,

            memberList: {
                headPicture: '',
                storeVip: '',
                mobile: '',
                balance: ''
            },

            memberLists: {
                mobile: '',
                userName: ''
            },

            memberid: '',
            infoList: [],
            phone3: '',
            getStaffInfoList: [],
            listindex: '',
            lists: [],
            selLists: [],
            vipIndex: '',
            Couponslist: [],
            listindexcoupon: '',
            couponid: '',
            num: 0,
            payNum: 0,
            deductionNum: 0,
            MemberDiscountDTO: [],
            isRounding: false,
            remark: '',
            selStatus: 1,
            hangOrderList: [],
            pid: '',
            fid: '',
            serviceIds: '',
            discountsData: '',

            i: {
                id: '',
                name: '',
                resultsPrice: '',
                commissionPrice: '',
                status: 0,
                brand: ''
            },

            id: 0,
            serviceList: []
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad(o) {
        console.log(o);

        if (o.memberList) {
            this.setData({
                memberList: JSON.parse(o.memberList),
                memberid: o.memberid
            });
        }

        if (o.serviceIds) {
            this.setData({
                serviceIds: JSON.parse(o.serviceIds)
            });
        }

        if (o.orderId) {
            this.getShopHangOrderById(o.orderId);
        } else {
            if (uni.getStorageSync('servesListFlag')) {
                this.setData({
                    infoList: JSON.parse(uni.getStorageSync('servesList'))
                });
                uni.setStorageSync('servesListFlag', false);
                uni.removeStorageSync('servesList');
                this.calculate();
            } else {
                this.getInfoList();
            }
        }
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady() {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {},
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {},
    methods: {
        // 获取当前店铺开单收银对应的提成方案
        staffCommissiond(num, staffId) {
            _request
                .postObj('/staffCommission/getShopStaffCommissionByBillRegister', {
                    action: this.memberid != '' ? 2 : 1,
                    isAppoint: 1,
                    // isMemberFastAction:this.data.memberid!=''? 2 :1,
                    memberId: this.memberid,
                    num: num,
                    price: this.payNum,
                    serviceId: this.serviceIds[0],
                    shopId: uni.getStorageSync('shopId'),
                    staffId: staffId
                })
                .then((res) => {
                    console.log('123', res);

                    if (res.data.code == 0) {
                        this.setData({
                            performance: res.data.data.performance,
                            royalties: res.data.data.royalties
                        });
                    } else {
                        this.setData({
                            performance: 0,
                            royalties: 0
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        getShopHangOrderById(id) {
            _request
                .get('/hangOrder/getShopHangOrderById', {
                    id: id
                })
                .then((res) => {
                    let data = res.data.data;

                    if (data.jsonStr) {
                        data.jsonStr = JSON.parse(data.jsonStr);
                    }

                    console.log(data.jsonStr);
                    this.setData({
                        memberid: res.data.data.memberId,
                        memberList: data.jsonStr.memberList,
                        serviceIds: data.jsonStr.serviceIds,
                        infoList: data.jsonStr.orderList,
                        payNum: data.jsonStr.payNum,
                        num: data.jsonStr.orderAmount,
                        couponid: data.jsonStr.couponid,
                        discountsData: data.jsonStr.discountsData,
                        remark: data.jsonStr.remark,
                        MemberDiscountDTO: data.jsonStr.MemberDiscountDTO
                    });
                    this.getMemberCoupons(data.jsonStr.orderAmount);
                    console.log(this.infoList);
                });
        },

        getHangOrderInfo() {
            _request
                .get('/hangOrder/getHangOrder', {
                    shopId: uni.getStorageSync('shopId')
                })
                .then((res) => {
                    let hangOrderList = [];

                    if (res.data.data.storeHangOrderType === 1) {
                        for (let i = 0; i < 30; i++) {
                            hangOrderList.push({
                                brand: i + 1,
                                status: 0
                            });
                        }

                        let data = res.data.data.data;
                        hangOrderList.forEach((i) => {
                            data.forEach((j, index) => {
                                if (i.brand == Number(j.brand)) {
                                    i.status = j.status;
                                    data.splice(index, 1);
                                }
                            });
                        });
                        data.forEach((i) => {
                            hangOrderList.push({
                                brand: Number(i.brand),
                                status: i.status
                            });
                        });
                        console.log(data);
                        console.log(hangOrderList);
                    } else {
                        hangOrderList = res.data.data.data;
                    }

                    this.setData({
                        hangOrderList: hangOrderList,
                        selStatus: res.data.data.storeHangOrderType
                    });
                });
        },

        // 创建订单
        createServiceOrder() {
            let joinStaffREQS = [];
            let serviceOrders = [];
            this.infoList.forEach((i) => {
                serviceOrders.push({
                    num: 1,
                    price: i.memberPrice,
                    serviceId: i.id,
                    serviceName: i.serviceName
                });

                if (i.selLists) {
                    i.selLists.forEach((j) => {
                        joinStaffREQS.push({
                            commissionPrice: j.commissionPrice,
                            resultsPrice: j.resultsPrice,
                            serviceId: i.id,
                            specified: j.specified ? 1 : 0,
                            staffId: j.staffId,
                            type: 1
                        });
                    });
                }
            });
            console.log(joinStaffREQS, serviceOrders);
            let data = {
                couponRecordId: this.couponid,
                memberId: this.memberid || 0,
                payAmount: this.payNum,
                //实际支付金额
                remark: this.remark,
                orderAmount: this.num,
                //订单金额
                shopId: uni.getStorageSync('shopId'),
                storeUserId: uni.getStorageSync('userId'),
                customerType: this.memberid ? false : true,
                memberDiscount: this.MemberDiscountDTO,
                joinStaffREQS: joinStaffREQS,
                serviceOrders: serviceOrders,
                serviceModel: 1
            };

            _request.postObj('/cashierOrder/createServiceOrder', data).then((res) => {
                if (res.data.code == 200) {
                    let orderNo = res.data.data.orderNo;
                    uni.navigateTo({
                        url: '/pagesc/pay/pay?orderNo=' + orderNo + '&marketprice=' + this.payNum + '&type=3'
                    });
                } else {
                    uni.showToast({
                        title: res.data.message,
                        icon: 'none'
                    });
                }
            });
        },

        // 挂单
        entryorders() {
            if (!this.indexs) {
                uni.showToast({
                    title: `请选择${this.selStatus === 1 ? '手牌号' : '门牌号'}`,
                    icon: 'none'
                });
            }

            let data = null;
            data = {
                couponid: this.couponid,
                discountsData: this.discountsData,
                remark: this.remark,
                orderAmount: this.num,
                payNum: this.payNum,
                MemberDiscountDTO: this.MemberDiscountDTO,
                orderList: this.infoList,
                memberList: this.memberList,
                memberid: this.memberid || 0,
                serviceIds: this.serviceIds,
                cardname: this.cardname
            };
            let datas = JSON.stringify(data);

            _request
                .postObj('/hangOrder/createHangOrder', {
                    brand: this.indexs,
                    hangType: 1,
                    jsonStr: datas,
                    shopId: uni.getStorageSync('shopId'),
                    memberId: this.memberid || 0,
                    floorId: this.selStatus === 2 ? this.fid : undefined
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        uni.showToast({
                            title: '挂单成功'
                        });
                        setTimeout(() => {
                            this.setData({
                                showModalhandbrand: false
                            });
                        }, 2000);
                        uni.redirectTo({
                            url: `pagesc/orderlist/orderlist`
                        });
                    } else {
                        uni.showToast({
                            title: res.data.message,
                            icon: 'none'
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        inputResultsPrice(e) {
            const { index, pindex } = e.currentTarget.dataset;
            this.infoList[pindex].selLists[index].resultsPrice = e.detail.value;
        },

        inputCommissionPrice(e) {
            const { index, pindex } = e.currentTarget.dataset;
            this.infoList[pindex].selLists[index].commissionPrice = e.detail.value;
        },

        // 获取会员优惠券
        getMemberCoupons(num) {
            console.log(num);

            _request
                .get('/cashierOrder/getMemberCoupons', {
                    shopId: uni.getStorageSync('shopId'),
                    memberId: this.memberid || 0,
                    orderAmount: num
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        this.setData({
                            Couponslist: res.data.data
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        // 选择优惠券
        onClickcoupon(e) {
            const { index, couponid } = e.currentTarget.dataset;
            this.setData({
                couponid: couponid,
                listindexcoupon: index,
                showModalcoupon: false
            });
            this.getMemberDiscount();
        },

        // 获取会员优惠后的金额
        getMemberDiscount() {
            let data = {
                shopId: uni.getStorageSync('shopId'),
                memberId: this.memberid || 0,
                price: this.num,
                couponRecordId: this.couponid,
                serviceId: this.serviceIds && this.serviceIds.join(','),
                isRounding: this.isRounding
            };

            _request
                .get('/cashierOrder/getMemberDiscount', data)
                .then((res) => {
                    if (res.data.code == 200) {
                        if (data.isRounding) {
                            uni.showToast({
                                title: '抹零成功',
                                icon: 'none'
                            });
                        }

                        this.setData({
                            payNum: res.data.data.amountToBeReceived,
                            deductionNum: res.data.data.discountsData,
                            MemberDiscountDTO: res.data.data.MemberDiscountDTO
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        goToAddGoods() {
            let ids = [];
            this.infoList.forEach((i) => {
                ids.push(i.id);
            });
            uni.navigateTo({
                url: `/pagesc/ordercashier/ordercashier?type=3&memberid=${this.memberid}&serviceIds=${this.serviceIds && JSON.stringify(this.serviceIds)}&memberList=${
                    this.memberList && JSON.stringify(this.memberList)
                }&ids=${ids && JSON.stringify(ids)}`
            });
        },

        delOneData(e) {
            const { index } = e.currentTarget.dataset;
            let data = this.infoList;
            data.splice(index, 1);
            this.setData({
                infoList: data
            });
            this.calculate();
        },

        calculate() {
            let num = 0;
            this.infoList.forEach((i) => {
                num += Number(i.memberPrice);
            });
            this.setData({
                num: num,
                payNum: num
            });
            this.getMemberCoupons(num);
            this.getMemberDiscount();
        },

        bntselllt() {
            this.setData({
                showModalselect: false
            });
        },

        clickSel() {
            let data = [];
            this.lists.forEach((i) => {
                if (i.checkout) {
                    data.push(i);
                }
            });
            this.setData({
                sums: data.length,
                showModalselect: false
            });
            console.log(this.staffid, 111);
            this.staffCommissiond(this.sums, this.staffid);
        },

        // 点击事件
        onClick(e) {
            const { index } = e.currentTarget.dataset; // for(let i of this.data.lists){
            this.lists[index].checkout = !this.lists[index].checkout;
            //   if (i.staffId == e.currentTarget.dataset.staffid) {
            //     i.checkout = true
            //   } else {
            //     i.checkout = false
            //   }
            // }

            this.setData({
                staffid: e.currentTarget.dataset.staffid
            });
        },

        // 去重选中
        deWeight: function (arr) {
            for (var i = 0; i < arr.length - 1; i++) {
                for (var j = i + 1; j < arr.length; j++) {
                    if (arr[i].staffId == arr[j].staffId) {
                        arr.splice(j, 1);
                    }
                }
            }

            return arr;
        },

        changeStatus(e) {
            const { index } = e.currentTarget.dataset;
            this.lists[index].specified = !this.lists[index].specified;
        },

        // 查询门店员工
        getStaffInfo() {
            _request
                .get('/cashier/getStaffInfo', {
                    shopId: uni.getStorageSync('shopId'),
                    keyword: this.phone3
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        let dataList = res.data.data;

                        for (let i of dataList) {
                            i.checkout = false;
                            i.specified = false;
                        }

                        if (this.infoList[this.vipIndex].selLists) {
                            for (let j of this.infoList[this.vipIndex].selLists) {
                                for (let i of dataList) {
                                    if (j.checkout) {
                                        if (j.staffId === i.staffId) {
                                            i.checkout = true;
                                        }
                                    }

                                    if (j.specified) {
                                        if (j.staffId === i.staffId) {
                                            i.specified = true;
                                        }
                                    }
                                }
                            }
                        }

                        this.setData({
                            lists: dataList
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        getInfoList() {
            _request
                .postObj('/cashier/svipServiceDiscount', {
                    shopId: uni.getStorageSync('shopId'),
                    memberId: this.memberid || 0,
                    serviceIds: this.serviceIds
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        this.setData({
                            infoList: res.data.data
                        });
                        this.calculate();
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        inquire2() {
            this.getMemberByMobile(this.phone2);
        },

        // 根据手机号码查询会员
        getMemberByMobile(phone) {
            _request
                .get('/cashier/getMemberByMobile', {
                    shopId: uni.getStorageSync('shopId'),
                    mobile: phone
                })
                .then((res) => {
                    if (res.data.code == 200) {
                        let obj = res.data.data;
                        console.log(obj, 111);
                        obj instanceof Object;

                        if (obj instanceof Object == false) {
                            uni.showToast({
                                title: res.data.data,
                                icon: 'none'
                            });
                        }

                        this.setData({
                            memberLists: res.data.data
                        });
                    }
                })
                .catch((error) => {
                    console.log(error, 'error');
                });
        },

        //替换
        replace() {
            this.setData({
                memberList: this.memberLists,
                memberid: this.memberLists.memberId,
                showModal: false
            });
            console.log(this.memberLists);
        },

        goProjectSet(e) {
            const { index } = e.currentTarget.dataset;
            uni.setStorageSync('servesList', JSON.stringify(this.infoList));
            uni.setStorageSync('servesListFlag', true);
            uni.navigateTo({
                url: `/pagesc/projectsetup/projectsetup?index=${index}&memberid=${this.memberid}&serviceIds=${this.serviceIds && JSON.stringify(this.serviceIds)}&memberList=${
                    this.memberList && JSON.stringify(this.memberList)
                }`
            });
        },

        ElasticFrameClick() {
            this.setData({
                showModal: true
            });
        },

        handbrand() {
            this.setData({
                showModalhandbrand: true
            });
            this.getHangOrderInfo();
        },

        getinfo(e) {
            this.setData({
                remark: e.detail.value
            });
        },

        indexnamber(e) {
            if (e.currentTarget.dataset.status === 1) {
                uni.showToast({
                    title: '手牌号已被选择',
                    icon: 'none'
                });
                return;
            }

            const { index } = e.currentTarget.dataset;
            this.setData({
                indexs: index
            });
        },

        indexNamberFloor(e) {
            const { brand, pid, id } = e.currentTarget.dataset;
            this.setData({
                indexs: brand,
                pid: pid,
                fid: id
            });
        },

        handbrandsum(e) {
            var brandsum = e.detail.value;
            this.setData({
                indexs: brandsum
            });
        },

        smearbut() {
            this.setData({
                isRounding: true
            });
            this.getMemberDiscount(); // this.setData({
            //   showModalsmearbut: true
            // })
        },

        // 选择抹零
        onClicksmear(e) {
            const { index } = e.currentTarget.dataset;
            this.setData({
                listindexcoupon: index,
                showModalcoupon: false
            });
        },

        affirm() {
            const { listindexsmear } = this;

            if (listindexsmear == 0) {
                let amountangle = Math.trunc(this.amountangle);
                this.setData({
                    amountangle: amountangle,
                    showModalsmearbut: false
                });
            } else if (listindexsmear == 1) {
                let amountangle = (parseInt(this.amountangle * 10) / 10).toFixed(1);
                this.setData({
                    amountangle: amountangle,
                    showModalsmearbut: false
                });
            } else if (listindexsmear == 2) {
                let amountangle = this.amountangle.toFixed(2);
                this.setData({
                    amountangle: amountangle,
                    showModalsmearbut: false
                });
            } else if (listindexsmear == 3) {
                let amountangle = Math.ceil(this.amountangle);
                this.setData({
                    amountangle: amountangle,
                    showModalsmearbut: false
                });
            }
        },

        done() {
            this.setData({
                showModalselect: false
            });
        },

        getShowModalselect(e) {
            const { index } = e.currentTarget.dataset;
            this.setData({
                showModalselect: true,
                vipIndex: index
            });
            this.getStaffInfo();
        },

        showModalcouponFun() {
            this.setData({
                showModalcoupon: true
            });
        },

        hideModal() {
            this.setData({
                showModal: false,
                showModalcoupon: false,
                showModalhandbrand: false,
                showModalsmearbut: false,
                showModalselect: false
            });
        },

        // 手机号2验证
        blurPhone2: function (e) {
            var phone = e.detail.value;
            this.setData({
                phone2: phone
            });
        },

        blurPhone3: function (e) {
            var phone = e.detail.value;
            this.setData({
                phone3: phone
            });
        },

        trueFun() {
            console.log('占位：函数 true 未声明');
        }
    }
};
</script>
<style>
page {
    background: #f1f1f1;
}

.cashier_box_2 {
    width: 750rpx;
    height: 240rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

/* 模态框 */
.modal-mask {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #000;
    opacity: 0.5;
    overflow: hidden !important;
    z-index: 9999;
    color: #fff;
}

.time-box2 {
    width: 210rpx;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.time-left {
    width: 21rpx;
    height: 15rpx;
}

.shop-message {
    height: 140rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(242, 93, 3, 0.16);
    border-radius: 10rpx;
    display: flex;
    align-items: center;
    width: 670rpx;
}

.shop-lt {
    width: 314rpx;
    height: 80rpx;
    display: flex;
}

.hr {
    width: 2rpx;
    height: 130rpx;
    background: linear-gradient(0deg, #ffffff, #e94a18, #ffffff);
}

.lt-profile {
    width: 80rpx;
    height: 80rpx;
    margin-left: 20rpx;
}
.lt-profile image {
    width: 80rpx;
    height: 80rpx;
}
.lt-name {
    font-size: 28rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    margin-left: 13rpx;
}

.lt-shopvip {
    width: 100rpx;
    height: 32rpx;
    background-color: rgba(233, 74, 24, 0.1);
    border-radius: 4rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
    padding: 0rpx 10rpx;
}

.lt-phone {
    font-size: 28rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    margin-top: 10rpx;
}

.shop-rl {
    width: 354rpx;
    display: flex;
    align-items: center;
    height: 80rpx;
    justify-content: space-between;
}

.rl-vip {
    font-size: 28rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.rl-remaining {
    font-size: 28rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    margin-top: 10rpx;
}

.rl-vipbox {
    margin-left: 28rpx;
}

.replace {
    width: 54rpx;
    height: 54rpx;
    margin-right: 15rpx;
}

/* 模态框 */
.modal-mask {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #000;
    opacity: 0.5;
    overflow: hidden !important;
    z-index: 9999;
    color: #fff;
}

/* 白色背景 */
.modal-content {
    position: fixed;
    top: 380rpx;
    z-index: 9999;
    width: 670rpx;
    margin-left: 40rpx;
    height: 780rpx;
    overflow: visible !important;
    background: #ffffff;
    border: 1rpx solid #e5e5e5;
    box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(102, 102, 102, 0.3);
    border-radius: 10rpx;
}

.modal_title {
    height: 130rpx;
    display: flex;
    align-items: center;
    padding-left: 22rpx;
    background-color: #fff;
    color: #fff;
    text-align: center;
    /* border-radius: 20rpx 20rpx 0px 0px; */
    font-size: 30rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #333333;
    line-height: 130rpx;
    border-bottom: 1rpx solid #e5e5e5;
}

.qrcodetextbox {
    text-align: center;
    height: 113rpx;
    border-bottom: 1rpx solid #e5e5e5;
}

.qrcodetextbox2 {
    display: flex;
    height: 180rpx;
    align-items: center;
}

.qrcodetext {
    margin: 0 12rpx;
    font-size: 36rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #333333;
    line-height: 113rpx;
}

.qrcodeimage {
    width: 300rpx;
    height: 300rpx;
    display: block;
    margin: 0 auto;
}

.qrcodespan {
    display: block;
    text-align: center;
    font-size: 24rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #666666;
    margin-top: 20rpx;
}

.modal_titleicon {
    width: 82rpx;
    height: 82rpx;
    background: linear-gradient(0deg, #f1aa14 0%, #fb7099 100%);
    border: 2rpx solid #ffffff;
    box-shadow: 0rpx 4rpx 4rpx 0rpx rgba(156, 100, 2, 0.2);
    border-radius: 50%;
}

.modal_titletext {
    font-size: 30rpx;
    font-family: Source Han Sans CN;
    font-weight: 400;
    color: #333333;
    margin-left: 8rpx;
}

.modal_textarea {
    height: 395rpx;
    width: calc(100% - 40rpx);
    margin: 20rpx;
    overflow: visible !important;
}

.modal_textarea textarea {
    height: 100%;
    width: 100%;
}

.qrcodeicon {
    width: 540rpx;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.qrcodeiconbox {
    margin-top: 48rpx;
    width: 100rpx;
    text-align: center;
}

.phone-hint {
    color: #ffffff;
    font-size: 24rpx;
}

.input-phone {
    width: 680rpx;
    height: 80rpx;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(233, 74, 24, 0.2);
    border-radius: 40rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    display: flex;
    padding-left: 30rpx;
    align-items: center;
    justify-content: space-between;
}

.input-phone-up {
    width: 590rpx;
    height: 80rpx;
    border-radius: 40rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1rpx solid #dcdcdc;
    border-radius: 40px;
    margin: 0 auto;
    padding-left: 20rpx;
}

.inquire {
    text-align: center;
    width: 120rpx;
    height: 60rpx;
    line-height: 60rpx;
    background: #ffffff;
    box-shadow: 0rpx 6rpx 14rpx 0rpx rgba(233, 74, 24, 0.16);
    border-radius: 30rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
    margin-right: 10rpx;
}

.replace-box {
    width: 590rpx;
    height: 120rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(102, 102, 102, 0.16);
    border-radius: 10rpx;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inquire2 {
    text-align: center;
    width: 120rpx;
    line-height: 60rpx;
    height: 60rpx;
    background: #e94a18;
    border-radius: 30rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    margin-right: 10rpx;
}

.replace-rl {
    width: 120rpx;
    height: 54rpx;
    background: #e94a18;
    border-radius: 27rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    line-height: 54rpx;
    margin-right: 10rpx;
    text-align: center;
}

.replace-lt {
    display: flex;
    align-items: center;
    height: 80rpx;
    margin-left: 20rpx;
}

.girl {
    width: 80rpx;
    height: 80rpx;
    margin-right: 22rpx;
}

.lt-nname {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    text-align: left;
}
.girl2 {
    width: 80rpx;
    height: 80rpx;
    margin-right: 29rpx;
    border-radius: 50%;
}

.lt-hpone2 {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.goods_list {
    width: 750rpx;
    /* height: 520rpx; */
    margin-top: 20rpx;
    background: #ffffff;
}

.list_t {
    display: flex;
    height: 99rpx;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1rpx solid #e5e5e5;
}

.list_t_l {
    display: flex;
    align-items: center;
}

.num {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
    margin-left: 40rpx;
}

.name {
    margin-left: 10rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.list_t_r {
    width: 200rpx;
    margin-right: 40rpx;
    display: flex;
    justify-content: space-between;
}

.edit_icon {
    width: 68rpx;
    height: 68rpx;
}

.del_icon {
    width: 68rpx;
    height: 68rpx;
}

.list_c {
    border-bottom: 1rpx solid #e5e5e5;
}

.list_c_t {
    width: 670rpx;
    height: 140rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(102, 102, 102, 0.16);
    border-radius: 10rpx;
    margin: 30rpx 40rpx;
    display: flex;
}

.list_c_t_l {
    width: 334rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1rpx solid #e5e5e5;
}

.no {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    margin-right: 33rpx;
}

.n {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
    display: block;
    width: 100rpx;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
._n {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
}
.inputPci {
    width: 100rpx;
    margin-left: 15rpx;
}

.list_c_t_r {
    width: 335rpx;
}

.results {
    height: 70rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1rpx solid #e5e5e5;
}

.results text {
    font-size: 26rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.commission {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70rpx;
}

.commission text {
    font-size: 26rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.list_c_b {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40rpx;
    margin-bottom: 40rpx;
}

.list_c_b image {
    width: 68rpx;
    height: 68rpx;
}

.list_b {
    height: 100rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.discount {
    color: red;
    margin-left: 30rpx;
}
.no_vip {
    margin-left: 40rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
}

.price {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
    margin-right: 40rpx;
}

.btn_box {
    width: 660rpx;
    height: 80rpx;
    background: #e94a18;
    border-radius: 40rpx;
    margin: 80rpx auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn_box text {
    font-size: 26rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.deduct_box {
    width: 750rpx;
    height: 520rpx;
    background: #ffffff;
}

.helpcard-conterbox {
    width: 100%;
    background: #ffffff;
    border-radius: 20rpx 20rpx 0rpx 0rpx;
    margin-top: -20rpx;
}

.helpcard-conter {
    padding: 0rpx 40rpx;
}

.vip-info {
    height: 92rpx;
    line-height: 92rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    border-bottom: 1rpx solid #e5e5e5;
    color: #333333;
}

.card-namebox {
    height: 99rpx;
    display: flex;
    line-height: 99rpx;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1rpx solid #e5e5e5;
}

.card-namebox2 {
    width: 670rpx;
    margin: 0 auto;
    height: 200rpx;
    display: flex;
    line-height: 99rpx;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1rpx solid #e5e5e5;
}

.cardname_lt {
    display: flex;
    align-items: center;
    height: 110rpx;
}

.cardname_rl {
    width: 20rpx;
    height: 23rpx;
}

.card_name {
    width: 170rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    text-align: right;
}

.card_name2 {
    width: 210rpx;
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    text-align: right;
}

.lt-namebox {
    display: flex;
    align-items: center;
    margin-bottom: 10rpx;
}

.select_card {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #e94a18;
}

.linkman {
    width: 28rpx;
    height: 26rpx;
    margin-right: 10rpx;
}

.da-name {
    font-size: 32rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.linkman2 {
    width: 22rpx;
    height: 33rpx;
    margin-right: 17rpx;
}

.autogeneration {
    text-align: center;
    line-height: 54rpx;
    width: 140rpx;
    height: 54rpx;
    background: #e94a18;
    border-radius: 27rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.no-autogeneration {
    width: 180rpx;
    height: 54rpx;
    background: #e5e5e5;
    border-radius: 27rpx;
    text-align: center;
    line-height: 54rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
}

.info_nomore {
    width: 22rpx;
    height: 14rpx;
}

.card-infobox {
    text-align: center;
    width: 670rpx;
    height: 108rpx;
    line-height: 108rpx;
    background: #f8f8f8;
    margin-top: 10rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
}

.time_card {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.calendar {
    width: 28rpx;
    height: 28rpx;
}

.base-box {
    z-index: 9990;
    position: fixed;
    bottom: 0rpx;
    width: 100%;
    height: 450rpx;
    background: #ffffff;
    border: 1rpx solid #dcdcdc;
    box-shadow: 2rpx -9rpx 20rpx 0rpx rgba(160, 159, 159, 0.1);
}

.base_btn {
    width: 100%;
    height: 500rpx;
    background: #fff;
}

.sumtotal {
    width: 140rpx;
    text-align: center;
    line-height: 60rpx;
    height: 60rpx;
    background: #e94a18;
    border-radius: 30rpx;
    font-size: 26rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.base-botton {
    width: 670rpx;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    margin-top: 76rpx;
}

.botton-entry {
    text-align: center;
    line-height: 80rpx;
    width: 320rpx;
    height: 80rpx;
    background: #e94a18;
    border-radius: 40rpx;
    font-size: 26rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.bill_moneytext {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.bill_money {
    color: #e94a18;
}

.coupon-box {
    width: 622rpx;
    height: 190rpx;
    background-image: url('https://yiyue-store-applet.oss-cn-shenzhen.aliyuncs.com/showModalcoupon.png');
    background-size: 100% 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.smearbut-box {
    width: 622rpx;
    height: 100rpx;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.coupon-lt {
    width: 167rpx;
    height: 155rpx;
    /* background-color: aquamarine; */
}

.coupon-sum {
    margin-top: 20rpx;
}

.money {
    font-size: 44rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    text-align: center;
}

.reduction {
    text-align: center;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.coupon-rl {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 30rpx;
}

.coupon-name {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
}

.coupon-time {
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
    margin-top: 10rpx;
    display: block;
    width: 327rpx;
}

.moneytext {
    font-size: 28rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.no-couponbut {
    width: 408rpx;
    height: 66rpx;
    background: #e94c19;
    box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(188, 46, 0, 0.2);
    border-radius: 33rpx;
    margin: 0 auto;
    margin-top: 60rpx;
    text-align: center;
    line-height: 66rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.time-box2q {
    width: 300rpx;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.time-box2qm {
    width: 225rpx;
    display: flex;
    align-items: center;
    margin: 0 auto;
}

.mains {
    height: 516rpx;
    overflow-y: auto;
}

.modal-mask2 {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #000;
    opacity: 0.5;
    overflow: hidden !important;
    z-index: 9999;
    color: #fff;
}

.bigbox {
    width: 36rpx;
    height: 36rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 30rpx;
}
.bigbox image {
    width: 36rpx;
    height: 36rpx;
}
.bigbox2 {
    width: 30rpx;
    height: 30rpx;
    border: 1px solid #e94a18;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15rpx;
}

.smbox {
    width: 18rpx;
    height: 18rpx;
    border-radius: 50%;
    background: #e94a18;
}

.modal-content-showModalhandbrand {
    position: fixed;
    top: 280rpx;
    z-index: 9999;
    width: 670rpx;
    margin-left: 40rpx;
    height: 850rpx;
    overflow: visible !important;
    background: #ffffff;
    border: 1rpx solid #e5e5e5;
    box-shadow: 0rpx 4rpx 14rpx 0rpx rgba(102, 102, 102, 0.3);
    border-radius: 10rpx;
}

.floor_title {
    display: flex;
    align-items: center;
    margin-top: 30rpx;
}
.one_floor {
    border-bottom: 1rpx solid #e5e5e5;
}
.floor_title view {
    width: 8rpx;
    height: 8rpx;
    background: #e94a18;
    border-radius: 50%;
    margin-left: 39rpx;
}
.floor_title text {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #222222;
    margin-left: 10rpx;
}
.handbrand-conter {
    display: flex;
    flex-wrap: wrap;
    padding: 0rpx 20rpx;
    margin-top: 40rpx;
    margin-left: 25rpx;
}
.btn_floor {
    margin: 0 auto;
}
.handbrandnumber {
    text-align: center;
    line-height: 80rpx;
    width: 80rpx;
    height: 80rpx;
    background: #e5e5e5;
    border-radius: 10rpx;
    margin: 0 48rpx 48rpx 0;
}
.noSelete {
    background: #ccc !important;
    color: #e5e5e5 !important;
}
.handbrandnumberac {
    text-align: center;
    line-height: 80rpx;
    width: 80rpx;
    height: 80rpx;
    background: #e94a18;
    border-radius: 10rpx;
    margin: 0 48rpx 48rpx 0;
    color: #fff;
}

.handbrandnumberac:nth-child(5n) {
    margin-right: 0;
}

.handbrandnumber:nth-child(5n) {
    margin-right: 0;
}

.mains {
    height: 516rpx;
    overflow-y: auto;
}

.coupon-mai {
    display: flex;
    height: 67rpx;
    width: 550rpx;
    margin: 0 auto;
    justify-content: space-between;
}

.cancel-bnt {
    text-align: center;
    line-height: 66rpx;
    width: 201rpx;
    height: 67rpx;
    border: 1rpx solid #dcdcdc;
    box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(102, 102, 102, 0.2);
    border-radius: 33rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
}

.affirm-bnt {
    text-align: center;
    line-height: 66rpx;
    width: 200rpx;
    height: 66rpx;
    background: #e94c19;
    box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(188, 46, 0, 0.2);
    border-radius: 33rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
}

.replace-box2 {
    width: 590rpx;
    height: 120rpx;
    background: #ffffff;
    box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(102, 102, 102, 0.16);
    border-radius: 10rpx;
    margin: 20rpx auto;
    display: flex;
    align-items: center;
}
.list_box {
    height: 350rpx;
    overflow-y: auto;
}

.replace-rl {
    width: 120rpx;
    height: 54rpx;
    background: #e94a18;
    border-radius: 27rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    line-height: 54rpx;
    margin-right: 10rpx;
    text-align: center;
}

.done {
    width: 26rpx;
    height: 26rpx;
    position: absolute;
    top: 18rpx;
    right: 11rpx;
}
.bnt-sell {
    display: flex;
    padding: 0rpx 40rpx;
    justify-content: space-between;
    align-items: center;
    height: 135rpx;
}

.bnt-selllt {
    width: 201rpx;
    text-align: center;
    line-height: 66rpx;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #666666;
    height: 66rpx;
    border: 1rpx solid #dcdcdc;
    box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(102, 102, 102, 0.2);
    border-radius: 33rpx;
}

.bnt-sellrl {
    text-align: center;
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #ffffff;
    line-height: 66rpx;
    width: 200rpx;
    height: 66rpx;
    background: #e94c19;
    box-shadow: 0rpx 10rpx 16rpx 0rpx rgba(188, 46, 0, 0.2);
    border-radius: 33rpx;
}
.lt-nname_yg {
    font-size: 30rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    display: block;
    width: 100rpx;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.hr_list {
    width: 1rpx;
    height: 110rpx;
    background: #e5e5e5;
    margin-left: 70rpx;
}
.specified_box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 20rpx;
}
.specified_item {
    display: flex;
    align-items: center;
}
.specified_item_av {
    margin-top: 20rpx;
}
.specified_item image {
    width: 30rpx;
    height: 30rpx;
}
.specified_item text {
    font-size: 24rpx;
    font-family: Adobe Heiti Std;
    font-weight: normal;
    color: #333333;
    margin-left: 10rpx;
}
.specified_item_sel text {
    color: #e94a18 !important;
}
.traveler {
    margin-top: 20rpx;
    margin-left: 10rpx;
}
</style>
